package com.lovo;

import com.lovo.redis.vo.UserVo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

import java.util.concurrent.TimeUnit;

@SpringBootTest(classes = com.lovo.RedisMain.class)
public class RedisListT {
    @Autowired
    private RedisTemplate<String, Object> redisTemplate;
    @Test
    public void getQueue(){
      UserVo vo=new UserVo();
      vo.setUserName("林冲");
      vo.setAge(30);
            String key = "logstash-list";
            redisTemplate.opsForList()
                    .leftPush(key,vo);


    }
}
